#include "stdio.h"
#include "../section_locate.h"

#include "pt-thread.h"

void pt_soft_timer_thread_test(void);

static char name[30] = "pt_soft_timer_thread_test";
struct func_pack sec_pt_soft_timer_thread_test __attribute__ ( ( section ( "func_area" ) ) ) = {
    .func_addr = pt_soft_timer_thread_test,
	.name_str = (uint32_t *)&name,
};


static void test_timer1_cb(void *parameter)
{
    (void)parameter;
    printf("test_timer1_cb\n");
}
static void test_timer2_cb(void *parameter)
{
    (void)parameter;
    printf("test_timer2_cb\n");
}


void pt_soft_timer_thread_test(void)
{


    static struct timer test_timer1;
    static struct timer test_timer2;

    pt_timer_init(&test_timer1, PT_NULL, test_timer1_cb, PT_NULL, 200, PT_TIMER_FLAG_PERIODIC | PT_TIMER_FLAG_SOFT_TIMER);
    pt_timer_init(&test_timer2, PT_NULL, test_timer2_cb, PT_NULL, 200, PT_TIMER_FLAG_PERIODIC | PT_TIMER_FLAG_SOFT_TIMER);
    pt_timer_start(&test_timer1);
    pt_timer_start(&test_timer2);

}

